home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEM / S-Z / Special Delivery™ Demo.cpt / Special Delivery™ Demo / Claris / Claris Translators / EPSF.rsrc / PS_0 < prev    next >
Text File  |  1991-06-19  |  7KB  |  421 lines

  1. /MAV 300 dict def
  2. MAV begin 
  3. /useClip true def 
  4. /top    0 def 
  5. /left   1 def 
  6. /bottom 2 def 
  7. /right  3 def 
  8. /CM     6 array def 
  9. /CTM    6 array def 
  10. /CTMR   6 array def 
  11. /MTC    6 array def 
  12. /blimit 1500 def 
  13. /bcnt   0 def 
  14. /rbox 8 array def 
  15. /segbox 8 array def 
  16. /bbox1 4 array def 
  17. /c1 3 array def 
  18. /c2 3 array def 
  19. /d 3 array def    
  20. /delta 3 array def 
  21. /mycurrentrgbcolor 3 array def 
  22. /ulx 0 def 
  23. /uly 1 def 
  24. /llx 2 def 
  25. /lly 3 def 
  26. /urx 4 def 
  27. /ury 5 def 
  28. /lrx 6 def 
  29. /lry 7 def 
  30. /sp [0 0] def 
  31. /ep [0 0] def 
  32. /bbox 4 array def 
  33. /pbox 4 array def 
  34. /scrnProc currentscreen 3 1 roll pop pop def
  35. /currentcolorscreen where {
  36. begin
  37. currentcolorscreen
  38. end
  39. 3 1 roll pop pop 
  40. 4 2 roll pop pop 
  41. 5 -2 roll pop pop 
  42. 6 -2 roll pop pop 
  43. /kProc exch def 
  44. /bProc exch def 
  45. /gProc exch def 
  46. /rProc exch def 
  47. } if 
  48. /Max {2 copy gt {pop}{exch pop} ifelse} bind def
  49. /cellPenW 72.0 /currentcolorscreen where
  50. {begin currentcolorscreen end pop pop
  51. 10 1 roll pop pop 8 1 roll pop pop
  52.  6 1 roll pop pop Max Max Max }
  53. {currentscreen pop pop} ifelse div 2.0 div def
  54. %%BeginProcSet : rect 
  55. /rect { 
  56.  /saveobj save def 
  57.  R PC PF LC SS 
  58.  saveobj restore 
  59. } bind def 
  60. %%EndProcSet 
  61. %%BeginProcSet : R 
  62. /R { 
  63.  newpath
  64.  pbox astore pop
  65.  0 792 translate 1 -1 scale CTMR currentmatrix pop exch translate
  66.  /objectCord mstore def
  67.  pbox right get 2 div
  68.  dup pbox left get exch sub
  69.  pbox left 3 -1 roll put 
  70.  dup pbox right 3 -1 roll put
  71.  pbox bottom get 2 div 
  72.  dup pbox top get exch sub
  73.  pbox top 3 -1 roll put
  74.  dup pbox bottom 3 -1 roll put
  75.  translate 
  76.  CTM currentmatrix pop
  77.  57.3 mul rotate
  78.  RT
  79. } bind def
  80. %%EndProcSet
  81. %%BeginProcSet : SaveScreenBW
  82.  /SaveScreenBW {
  83.  currentscreen
  84.  /scrnProc exch def
  85.  /scrnAngle exch def
  86.  /scrnFreq exch def
  87.   } bind def
  88. %%EndProcSet
  89. %%BeginProcSet : RestoreScreenBW
  90.  /RestoreScreenBW {
  91.  scrnFreq scrnAngle MAV /scrnProc get setscreen
  92.  } bind def
  93. %%EndProcSet
  94. %%BeginProcSet : SetFreqAngleBW
  95.  /SetFreqAngleBW {
  96.  currentscreen
  97.  3 1 roll
  98.  pop pop
  99.  setscreen
  100.  } bind def
  101. %%EndProcSet
  102. %%BeginProcSet : SaveScreenColor 
  103.  /SaveScreenColor {
  104.  currentcolorscreen
  105.  /grayProc exch def
  106.  /grayAngle exch def
  107.  /grayFreq exch def
  108.  /bProc exch def
  109.  /bAngle exch def
  110.  /bFreq exch def
  111.  /gProc exch def
  112.  /gAngle exch def
  113.  /gFreq exch def
  114.  /rProc exch def
  115.  /rAngle exch def
  116.  /rFreq exch def
  117.   } bind def
  118. %%EndProcSet
  119. %%BeginProcSet : RestoreColorScreen
  120.  /RestoreColorScreen {
  121.  rFreq rAngle MAV /rProc get gFreq gAngle MAV /gProc get bFreq bAngle MAV /bProc get grayFreq grayAngle MAV /grayProc get setcolorscreen
  122.  } bind def
  123. %%EndProcSet
  124. %%BeginProcSet : SetFreqAngleColor
  125.  /SetFreqAngleColor { 
  126.  currentcolorscreen 
  127.  3 1 roll pop pop
  128.  4 2 roll pop pop
  129.  5 -2 roll pop pop
  130.  6 -2 roll pop pop
  131.  4 1 roll 
  132.  6 1 roll 
  133.  8 1 roll 
  134.  10 1 roll 
  135.  setcolorscreen 
  136.  } bind def 
  137. %%EndProcSet 
  138. /initmsaverestore { 
  139. userdict begin 
  140. /mdict 10 dict def 
  141. mdict begin 
  142. /mindex -1 def 
  143. /mstacksize 25 def 
  144. /mstack mstacksize array def 
  145. /incmindex { 
  146. /mindex mindex 1 add def 
  147. } bind def 
  148. /decmindex { 
  149. /mindex mindex 1 sub def 
  150. } bind def 
  151. /checkmindex { 
  152. mindex 0 lt { 
  153. (%ERROR: msave/mrestore stack underflow: Offending command 'mrestore'
  154. ) print flush 
  155. stop 
  156. mindex mstacksize ge { 
  157. (%ERROR: msave/mrestore stack overflow: Offending command 'msave'
  158. ) print flush 
  159. stop 
  160. } if 
  161. } ifelse 
  162. } bind def 
  163. /mpush { 
  164. incmindex 
  165. checkmindex 
  166. mstack mindex 
  167. 3 -1 roll put 
  168. } bind def 
  169. /mpop { 
  170. checkmindex 
  171. mstack mindex get 
  172. decmindex 
  173. } bind def 
  174. end 
  175. end 
  176. } bind def 
  177. /msave { 
  178. mdict begin 
  179. matrix currentmatrix mpush 
  180. end 
  181. } bind def 
  182. /mrestore { 
  183. mdict begin 
  184. mpop setmatrix 
  185. end 
  186. } bind def 
  187. /msavelevel { 
  188. mdict begin 
  189. mindex 1 add 
  190. end 
  191. } bind def 
  192. /mstore {
  193. matrix currentmatrix
  194. } bind def
  195. /AutoSizeY {
  196. 0 0 pl
  197. dup 3 1 roll
  198. 4 -1 roll  
  199. add
  200. pl exch pop
  201. exch sub
  202. } bind def
  203. /pl {  
  204. transform
  205. 0.25 sub round 0.25 add exch
  206. 0.25 sub round 0.25 add exch
  207. itransform
  208. } bind def
  209. /pll {
  210. transform
  211. round exch
  212. round exch
  213. itransform
  214. } bind def
  215. /pr { 
  216. dtransform
  217. round exch
  218. round exch
  219. idtransform
  220. } bind def
  221. /m { 
  222. pl  moveto
  223. } bind def
  224. /l { 
  225. pl lineto
  226. } bind def
  227. /c { 
  228. pl curveto
  229. } bind def
  230. /rm { 
  231. pr rmoveto
  232. } bind def
  233. /rl { 
  234. pr rlineto
  235. } bind def
  236. /ar { 
  237. 5 -2 roll pl
  238. 5 2 roll
  239. arc
  240. } bind def
  241. /an { 
  242. 5 -2 roll pl
  243. 5 2 roll
  244. arcn
  245. } bind def
  246. /MakePatternFont {
  247. /FontDict 20 dict def
  248. FontDict begin
  249. /FontName exch def
  250. /Encoding exch def
  251. /FontMatrix [1 0 0 1 0 0 ] def
  252. /FontType 3 def
  253. /FontBBox [ 0 0 1 1 ] def
  254. /PatternDict exch def
  255. /RenderPattern {
  256. patternDict exch get
  257. exec
  258. } bind def
  259. /BuildChar {
  260. exch begin
  261. 1 0 0 0 1 1 setcachedevice
  262. Encoding exch get RenderPattern
  263. end
  264. } bind def
  265. FontName FontDict definefont pop
  266. end
  267. } bind def
  268. /SnapToPattenGrid
  269.     {
  270.     exch
  271.     dup 0 lt {
  272.         1 index sub
  273.     } if
  274.     1 index
  275.     div truncate
  276.     mul
  277. } bind def
  278. /FillPatternString {
  279. dup length
  280. 1 sub
  281. 0 1 3 -1 roll {
  282. 2 index
  283. 2 index
  284. 3 -2 roll
  285. put
  286. } for
  287. pop pop
  288. } bind def
  289. /AutoSizeY {
  290.     0.0 exch dtransform
  291.     round
  292.     idtransform exch pop
  293. } bind def
  294.  /AutoSizeX {
  295.     0.0 dtransform
  296.     exch
  297.     round
  298.     exch
  299.     idtransform pop
  300. } bind def 
  301. /AutoCellSize {
  302.     AutoSizeY
  303.     exch
  304.     AutoSizeX
  305.     exch
  306. } bind def
  307. /CheckPath {
  308.     false
  309.     { pop pop pop true exit}
  310.     { pop pop pop true exit}
  311.     { pop pop pop pop pop pop pop true exit}
  312.     { pop true exit}
  313.     pathforall
  314. } bind def
  315. /PatternFill {                    %        patternCharacter
  316.     /patternString 1 string def
  317.     /cm mstore def
  318.     patternMatrix setmatrix
  319.     1 1 AutoCellSize
  320.     dup 0 eq { pop 1} if
  321.     exch
  322.     dup 0 eq { pop 1} if
  323.     exch
  324.     /patternSize exch 24.0 mul def
  325.     /PatternSizeX exch 24.0 mul patternString length mul def
  326.     /flaterror 0 def
  327.     patternString FillPatternString
  328.     gsave
  329.         flaterror 1 add setflat
  330.         flattenpath
  331.         pathbbox
  332.     grestore
  333.     psy add flaterror add psy SnapToPattenGrid
  334.     exch psx add flaterror add psx SnapToPattenGrid
  335.     3 -1 roll flaterror sub psy SnapToPattenGrid
  336.     4 -1 roll flaterror sub psx SnapToPattenGrid
  337.     4 2 roll pll
  338.     4 2 roll pll
  339.     /llxsnap exch def
  340.     /llysnap exch def
  341.     /urxsnap exch def
  342.     /urysnap exch def
  343.     gsave
  344.         useClip true eq {clip}{eoclip} ifelse newpath
  345.         /PatternFont findfont [psx 0.0 0.0 psy 0.0 0.0] makefont setfont
  346.         llysnap patternSize urysnap {
  347.             llxsnap exch moveto
  348.             llxsnap PatternSizeX urxsnap {
  349.                 pop
  350.                 patternString show
  351.                 %currentpoint am
  352.             } for
  353.         } bind for
  354.     grestore
  355.     cm setmatrix
  356. } bind def                %        End 'PatternFill'
  357. /DefaultPatternFont {
  358.     /cm mstore def
  359.     patternMatrix setmatrix
  360.     1 1 AutoCellSize
  361.     dup 0 eq { pop 1} if
  362.     exch
  363.     dup 0 eq { pop 1} if
  364.     exch
  365.     /psy exch iSizeY mul def
  366.     /psx exch iSizeX mul def
  367.     /patternDict 64 dict def
  368.     patternDict begin
  369.         /NotDef {} def
  370.         /LiteDiagLines {
  371.             iSizeX iSizeY false [iSizeX 0.0 0.0 iSizeY -1.0 mul  0.0 iSizeY]
  372.             {pat}
  373.             imagemask
  374.         } bind def
  375.     end
  376.     /CustEncoding 256 array def
  377.     0 255 1 {
  378.         CustEncoding exch /NotDef put
  379.     } bind for
  380.     CustEncoding 65 /LiteDiagLines put
  381.     patternDict CustEncoding /PatternFont MakePatternFont
  382.     /pathSegProc {
  383.         strokepath
  384.         CheckPath {
  385.             65 PatternFill newpath
  386.         } if
  387.     } bind def
  388.     cm setmatrix
  389. } bind def
  390. /XRound {
  391.     dup
  392.     3 -1 roll
  393.     exch mul round
  394.     exch div
  395. } bind def
  396. /RoundMatrix {
  397.     /i 0 def
  398.     dup {
  399.         100000.0 XRound
  400.         1 index
  401.         exch i exch put
  402.         /i i 1 add def
  403.     } forall
  404. } bind def
  405. /GetBoxesRatio {
  406. 3 -1 roll sub
  407. 7 1 roll
  408. exch sub
  409. 6 1 roll
  410. 3 -1 roll sub
  411. 5 1 roll
  412. exch sub
  413. 4 1 roll
  414. 3 -1 roll div
  415. 3 1 roll
  416. exch div
  417. exch
  418. } bind def